from redis.asyncio.client import Redis


class RedisManager:
    client = None

    async def connect(self, url):
        self.client = Redis.from_url(url, decode_responses=True)
        await self.client.initialize()

    async def disconnect(self):
        await self.client.close()


redis = RedisManager()
